﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace backend.Models;

public partial class User
{
    [Key]
    [Column("U_ID")]
    [StringLength(8)]
    [Unicode(false)]
    public string UId { get; set; } = null!;

    [Column("U_Password")]
    [StringLength(64)]
    [Unicode(false)]
    public string UPassword { get; set; } = null!;

    [Column("U_Name")]
    [StringLength(64)]
    public string UName { get; set; } = null!;

    [Column("U_Contact")]
    [StringLength(32)]
    public string UContact { get; set; } = null!;

    [Column("U_Role")]
    [StringLength(16)]
    public string URole { get; set; } = null!;

    [InverseProperty("MIdNavigation")]
    public virtual MaintenanceMan? MaintenanceMan { get; set; }

    // 创建的工单
    [InverseProperty("UIdNavigation")]
    public virtual ICollection<RepairRequest> RepairRequests { get; set; } = new List<RepairRequest>();
}
